import axios from "axios";



/**
 * 发电系数导入
 * @param file
 * @returns {AxiosPromise}
 */
export function importCoefficient(file) {
  return axios({
    method:"post",
    url:"/data/analysis/photovoltaic/importCoefficient",
    data:file
  })
}

/**
 * 分批导入用户负荷数据
 * @param file
 * @returns {AxiosPromise}
 */
export function importCustLoadPage(file) {
  return axios({
    method:"post",
    url:"/data/analysis/photovoltaic/importCustLoadPage",
    responseType:'blob',
    data:file
  })
}

/**
 * 数据分析
 * @returns {AxiosPromise}
 */
export function analysis() {
  return axios({
    method:"get",
    url:"/data/analysis/photovoltaic"
  })
}

/**
 * 重置用户负荷数据
 * @returns {AxiosPromise}
 */
export function resetCustLoad() {
  return axios({
    method:"get",
    url:"/data/analysis/photovoltaic/resetCustLoad",
    data:{}
  })
}

/**
 *更新数据分析消纳比配置
 * @param absorbRate
 * @returns {AxiosPromise}
 */
export function configAbsorbRate(absorbRate) {
  return axios({
    method:"post",
    url:"/data/analysis/configAbsorbRate",
    params:{
      absorbRate:absorbRate
    }
  })
}


/*
*时段配置
 */
export function configSystemTimeInterval(systemTimeIntervalList) {
  return axios({
    method:"post",
    url:"/data/analysis/config/configSystemTimeInterval",
    data:systemTimeIntervalList
  })
}

export function config(configMap) {
  return axios({
    method:"post",
    url:"/data/analysis/config",
    data:configMap
  })
}


